In Day3, I selected the SUT and defined the basic test scope.
Okay, so now I can finally start building the project.
For this project, I will use VS Code as the IDE and Python as the programming language.
And the testing stack, I will use pytest as the test framework and requests to communicate with the REST API.
The project will be managed with Git and stored on GitHub for version control.
Set Up the Development Environment:
Before writing any tests, I first set up an isolated Python environment for the project.
First, I checked the Python version:
python --version
Then I created and activated a virtual environment:
python -m venv .venv
# Windows
.venv\Scripts\activate
After activating the environment, I installed the first two dependencies:
python -m pip install pytest requests
pytest — the test framework used to organize and execute tests.
requests — the HTTP client used to send requests to the REST API.
Last, I saved the installed dependencies:
pip freeze > requirements.txt
The requirements.txt file records the Python dependencies used by the project, so the same environment can be recreated later.
For now, the environment is very simple.but the project is ready to grow.
Set Up Version Control
With the Python environment ready, I created a GitHub repository for the project and cloned it to my local machine.
I want to use version control from the beginning, even though the project is still very small.
At this point:
No real API tests yet.
Tomorrow, I'll start sending requests to Restful Booker and build the first API tests.